package net.lzzy.chapter506;

public class Greetings implements Runnable {
    private String greetings;
    private int num;

    public Greetings() {
    }

    public Greetings(String greetings, int num) {
        this.greetings = greetings;
        this.num = num;
    }

    public String getGreetings() {
        return greetings;
    }

    public void setGreetings(String greetings) {
        this.greetings = greetings;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    @Override
    public void run() {
        for (int i = 0; i < num ; i++) {
            System.out.println(greetings+" ");
        }
    }
}
